package com.slliver.service;


import com.slliver.mapper.OrderMapper;
import com.slliver.pojo.Order;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service("orderService")
public class OrderService {

    private final OrderMapper orderMapper;

    public OrderService(OrderMapper orderMapper){
        this.orderMapper = orderMapper;
    }

    @Value("${server.port}")
    private int port;

    public Order getProductById(Integer id){
        System.out.println("运行的服务器的端口是:["+port+"]");
        return orderMapper.selectByPrimaryKey(id);
    }

}
